function fname = aft_FilenameOnDisk(hfile)
% AFT::FilenameOnDisk  - returns the filename property
%
% FORMAT:       filename = obj.FilenameOnDisk;
%
% No input fields
%
% Output fields:
%
%       filename    last used filename (on load or save)
%
% TYPES: ANY

% Version:  v0.8a
% Build:    9102122
% Date:     Oct-21 2009, 10:18 PM CEST
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% only valid for single file
if nargin < 1 || ...
    numel(hfile) ~= 1 || ...
   ~isBVQXfile(hfile, true)
    error( ...
        'BVQXfile:BadArgument', ...
        'Invalid call to %s.', ...
        mfilename ...
    );
end

% get file name
sc = bvqxfile_getscont(hfile.L);
fname = sc.F;
